package com.itheima.exer.exercise.ex0925;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;

public class SetDate2 {
    public static void main(String[] args) {
        System.out.println("现在是"+ LocalDateTime.now());
        System.out.println("我们想穿越到:"+LocalDateTime.now().withYear(2050).format(DateTimeFormatter.ofPattern("yyyy年")));
    }
}
